package com.crm.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("course") // 指定数据库表名
@ApiModel(value = "课程信息")
public class Course implements Serializable {

    @TableId(value = "id", type = IdType.AUTO) // 指定主键字段及其生成策略  
    private Integer id;

    @TableField("create_by") // 字段名与属性名不一致时，通过@TableField指定数据库字段名
    private String createBy;

    @TableField("create_time")
    private LocalDateTime createTime; // 推荐使用Java 8的日期时间API  

    @TableField("update_by")
    private String updateBy;

    @TableField("update_time")
    private LocalDateTime updateTime;

    @TableField("name")
    private String name;

    @TableField("code")
    private String code;

    @TableField("subject")
    private String subject;

    @TableField("price")
    private Integer price;

    @TableField("applicable_person")
    private Character applicablePerson; // 使用Character来存储单个字符  

    @TableField("info")
    private String info;

}